/*时间轴*/
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:frametrim/utility/sq_color.dart';

class TimeLineView extends StatefulWidget {
  late Widget rightWidget;
  late int mSize;
  late int mIndex;

  TimeLineView(this.rightWidget,this.mIndex,this.mSize);

  @override
  State<StatefulWidget> createState() =>TimeLineState();
}
class TimeLineState extends State<TimeLineView>{
  @override
  Widget build(BuildContext context) {
    return Container(
      padding: EdgeInsets.only(left: 10, right: 10),
      child: Stack(
        children: <Widget>[
          Positioned(
            left: 0,
            top: 0,
            bottom: 0,
            child: buildTimeLine(),
          ),
          widget.rightWidget,
        ],
      ),
    );
  }

  /*时间轴*/
  Widget buildTimeLine() {
    return Container(
      child: Column(
        mainAxisSize: MainAxisSize.max,
        children: [
          Visibility(
              visible: true,
              child: Container(
                height: 20,
                child: const VerticalDivider(
                  width: 1,
                  color: Color(0xffE7E7E7),
                ),
              )),
          Container(
            width: 12,
            height: 12,
            decoration: BoxDecoration(
                color: SQColor.primary,
                borderRadius: BorderRadius.all(Radius.circular(6))),
          ),
          Expanded(
            child: Visibility(
              visible: true,
              child: Container(
                height: 10,
                child: VerticalDivider(
                  width: 1,
                  color: Color(0xffE7E7E7),
                ),
              ),
            ),
          )
        ],
      ),
    );
  }


}